package homework1204;


import java.io.IOException;
import java.io.OutputStream;
import java.net.ServerSocket;
import java.net.Socket;

public class SocketServer {
    public static void main(String[] args) throws IOException {
        ServerSocket ss = new ServerSocket(5678);
        Socket sc = ss.accept();

        OutputStream os = sc.getOutputStream();
        String s = "hello,here is server.";
        os.write(s.getBytes());
        os.close();
    }
}
